#pragma once

class CBuffer  
{
public:
	BOOL isFull();
	BOOL isEmpty();
	void Empty();
	int GetLength();
	CBuffer(int size = 512*100);
	virtual ~CBuffer();
	int Write(char* buf, int count);
	int Read(char* buf, int count);
	int TestRead(char* buf, int count);
private:
	BOOL m_bEmpty, m_bFull;
	char * m_pBuf;
	int m_nBufSize;
	int m_nReadPos;
	int m_nWritePos;
};
